package com.itheima.service;

import com.itheima.bean.ShoppingCart;

import java.util.List;

public interface ShoppingCartService {
    /**
     * 添加购物车
     * @param shoppingCart
     * @return
     */
    ShoppingCart add(ShoppingCart shoppingCart);

    /**
     * 按照用户的id来查询数据
     * @param userId
     * @return
     */
    List<ShoppingCart> findAll(Long userId);

    /**
     * 按照用户的id来清空购物车
     * @param userId
     * @return
     */
    int delete(Long userId);
}
